<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!DOCTYPE HTML>
<html>
<head>
    <base href="${ctx }/">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <link rel="stylesheet" href="plugin/bootstrap-3.3.7-dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="alert/alert.css">
    <style type="text/css">
        @media (min-width: 992px)
		.col-md-2 {
		    width: 28.666667%;
		}
    </style>
</head>
<body>

        <div class="col-md-12">
            <ul class="breadcrumb">
                <li>
                    <i class="icon-home home-icon"></i>
                    <a href="javascript:void(0)">Driver Management(司机管理)</a>
                </li>
                <li class="active">
                    <a href="view/driver/driver.jsp">Driver Database(司机列表)</a>
                </li>
                <li class="active">
                    <a href="user/info">Driver Details(司机详情)</a>
                </li>
            </ul>
        </div>
        <div class="container-fluid" style="">
    <div class="container row">
        <div class="col-md-12">
            <div class="col-md-2">
                <img src="${user.picture}" class="img-circle" height="60px" width="60px">
            </div>
        </div>
        <div class="col-md-12">
            <h4>Driver Information(司机信息)：</h4>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">FristName(名称)：</div>
            <div class="col-md-10">${user.firstName}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Gender(性别)：</div>
            <div class="col-md-10">
                <c:if test="${user.sex==0}">male</c:if>
                <c:if test="${user.sex==2}">其它</c:if>
                <c:if test="${user.sex==1}">female</c:if>
            </div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Phone(电话)：</div>
            <div class="col-md-10">${user.telephone}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Email(邮箱)：</div>
            <div class="col-md-10">${user.email}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Address(地址)：</div>
            <div class="col-md-10">${user.address}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Postcode(邮编)：</div>
            <div class="col-md-10">${user.postcode}</div>
        </div>

        <div class="col-md-12">
            <h4>Bank Accounrt(银行卡好)：</h4>
        </div>
        <div class="col-md-12">
            <c:forEach items="${cards}" var="c">
                <%-- <div class="col-md-2">Bank Name(银行名称)：</div>
                <div class="col-md-3">${c.brankName}</div> --%>
                <div class="col-md-3">BSB(BSB)：</div>
                <div class="col-md-3">${c.bsb}</div>
                <div class="col-md-2">Account Number(卡号)：</div>
                <div class="col-md-3">${c.ubBrankNo}</div>
            </c:forEach>
        </div>

        <div class="col-md-12">
            <h4>Vehicle Details(车的信息):</h4>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">REGO(车牌号)：</div>
            <div class="col-md-10">${car.licensePlate}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Make(品牌)：</div>
            <div class="col-md-10">${car.vehicleRand}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Model(型号)：</div>
            <div class="col-md-10">${car.carType}</div>
        </div>
        <%-- <div class="col-md-12">
            <div class="col-md-2">生产日期：</div>
            <div class="col-md-10">
                <fmt:formatDate value="${car.productionDate}" pattern="yyyy-MM-dd hh:mm:ss"></fmt:formatDate>
            </div>
        </div> --%>
        <div class="col-md-12">
            <div class="col-md-2">Color(颜色)：</div>
            <div class="col-md-10">  ${car.color} </div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">Photo(图片)：</div>
            <c:forEach items="${car.pics}" var="p">
                <div class="col-md-3">
                    <img src="${p}" height="120px" width="120px">
                </div>
            </c:forEach>
        </div>

        <div class="col-md-12">
            <div class="col-md-2">certificate ID(证书ID)：</div>
            <div class="col-md-10">${user.cardId}</div>
        </div>
        <div class="col-md-12">
            <div class="col-md-3">Driver License：</div>
            <div class="col-md-9"><img src="${user.licenceImg }" height="120px"></div>
        </div>
        <div class="col-md-12">
            <div class="col-md-2">货币证书：</div>
            <div class="col-md-10">${user.driverAccreditation }</div>
        </div>
       <!--  <div class="col-md-12">
            <div class="col-md-2">司机鉴定：</div>
            <div class="col-md-10"></div>
        </div> -->
    </div>
</div>
</body>

<!-- 加载需要的js -->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="plugin/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src='alert/alert.js'></script>
<script src="plugin/layer/layer.js"></script>
<script type="text/javascript" charset="utf-8">
//    var M = {}
//
//    function changeStatus(id, isDeleted, current) {
//        $.post(
//            "user/update",
//            {id: id, isDeleted: isDeleted},
//            function (json) {
//                if (json.code == 200) {
//                    M.dialog2 = jqueryAlert({
//                        'title': '温馨提示',
//                        'content': '<p>操作成功</p>',
//                        'width': "320",
//                        'modal': true,
//                        'buttons': {
//                            '确定': function () {
//                                M.dialog2.close();
//                            }
//                        }
//                    });
//                } else {
//                    M.dialog2 = jqueryAlert({
//                        'title': '温馨提示',
//                        'content': '<p>系统繁忙，请稍后重试</p>',
//                        'width': "320",
//                        'modal': true,
//                        'buttons': {
//                            '确定': function () {
//                                M.dialog2.close();
//                            }
//                        }
//                    });
//                }
//                if (M.dialog2) {
//                    return M.dialog2.show();
//                }
//            }
//        )
//    }
</script>
</html>


